import { connect } from 'react-redux'
import { Toppics } from '../style.js'
const Topic = (props) => {
  const { list } = props
  return (
    <Toppics className="Toppics">
      {list.map((item) => {
        return <li key={item.get('id')}>{item.get('title')}</li>
      })}
    </Toppics>
  )
}

const mapStateToProps = (state) => ({
  list: state.getIn(['home', 'topList']),
  // list: state.getIn('home').getIn('topList'),
})

export default connect(mapStateToProps, null)(Topic)
// export default Topic;
